<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewCustomerTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="#{bundle.ViewCustomerLabel_customerCode}"/>
                    <h:outputText value="#{customerController.selected.customerCode}" title="#{bundle.ViewCustomerTitle_customerCode}"/>
                    <h:outputText value="#{bundle.ViewCustomerLabel_customerName}"/>
                    <h:outputText value="#{customerController.selected.customerName}" title="#{bundle.ViewCustomerTitle_customerName}"/>
                    <h:outputText value="#{bundle.ViewCustomerLabel_phone}"/>
                    <h:outputText value="#{customerController.selected.phone}" title="#{bundle.ViewCustomerTitle_phone}"/>
                    <h:outputText value="#{bundle.ViewCustomerLabel_address}"/>
                    <h:outputText value="#{customerController.selected.address}" title="#{bundle.ViewCustomerTitle_address}"/>
                    <h:outputText value="#{bundle.ViewCustomerLabel_balance}"/>
                    <h:outputText value="#{customerController.selected.balance}" title="#{bundle.ViewCustomerTitle_balance}"/>
                    <h:selectBooleanCheckbox value="#{customerController.boolean1}" disabled="true" />دائن
                    <h:outputText value="#{bundle.ViewCustomerLabel_other}"/>
                    <h:outputText value="#{customerController.selected.other}" title="#{bundle.ViewCustomerTitle_other}"/>
                    </h:panelGrid>
                <center>
                    <h:panelGroup    rendered="${limits==0}">
                <h:commandButton action="#{customerController.destroyAndView}" value="#{bundle.ViewCustomerDestroyLink}" class="btn btn-primary"/>
                
                <h:commandButton action="Edit" value="#{bundle.ViewCustomerEditLink}" class="btn btn-primary"/>
                </h:panelGroup>
                <h:commandButton action="#{customerController.prepareList}" value="#{bundle.ViewCustomerShowAllLink}" class="btn btn-primary"/>
                </center>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
